   <?php
   //userQueries::userLevel("1");
      $auth = Auth::getAuth('current_user');
      $userCompany = new userQueries();
      functions::landing_page($auth);
      
      
      //$data = session_get_cookie_params();
      //var_dump($data);
      //foreach ($data as $key=>$value) {
      //    echo $value;
      //}
      echo $_COOKIE['SESSCOOKIES_USERNAME'];
     
   ?>
<div class="content_wrapper">
   <div class="padding_5">
      <div class="body_header_container">
         <div class="head">
            <div class="title_head">
               <i class="icon-envelope"></i> Message
            </div>
            <div class="right_bar_menu">
               <div class="_create_msg" data-action="dropdown-menu-conversation">
                  <i class="icon-pencil"></i> Create Message
               </div>
            </div>
         </div>
      </div>
      <div class="pull-left length3">
         <div class="widget" style="height: 510px;background-color: #fff;">
            <div class="head">
               <div class="title_head">
                  Inbox
               </div>
               <div class="right_bar_tab num">
                  <a href="#" class="redNum inboxCount cursor"><?php echo $userCompany->countMsg($auth['id']); ?></a>
               </div>
            </div>
            <!-- Show list of msg on inbox -->
            
            <div class="scrollbarM contentHolder">
               <center>
                  <img src="/images/loader/loader.gif" class="display load_m offsetTop5" />
               </center>
               <ul class="loadMsgList"></ul>
            </div>
          </div>
      </div>
      <div class="pull-right" style="width: 69%;">
         <div class="widget" style="min-height: 500px;background-color: #fff;">
            <div class="head">
               <div class="title_head">
                  <label class="conversationTo"></label>
               </div>
               <div class="right_bar_menu">
                  <div class="view_msg_settings" data-action="dropdown-menu-msg">
                     <i class="icon-cog"></i> Actions
                  </div>
                  <ul class="dropdown-menu dropdown-menu-msg pull-right">
                     <!--<li><a class=""><i class="icon-remove"></i>Delete Message</a></li>-->
                     <li><a class="deleteMessage deleteConversation" data-id=""><i class="icon-trash"></i>Delete Conversation</a></li>
                     <li><a class="addPeopleConversation" data-id="" data-re=""><i class="icon-plus"></i>Add People</a></li>
                  </ul>
               </div>
            </div>
            
            <div class="crt_new_msg display" style="float: left;width:100%;">
               <div style="overflow:auto;overflow-x: hidden;height:450px;padding: 5px;">
                  <div id="userList" style="float: left;border: 1px solid #ddd;min-height: 40px;margin-top: 5px;width: 100%;padding-bottom: 8px;">
                     <div style="float:left;margin-top: 13px;margin-left:12px;font-weight: bold;">
                        To:
                     </div>
                        <input type="text" id="listRecipient1" class="input-small msgBoxTo" data-tag-id="0" style="border: none;box-shadow:none;margin-left: 12px;margin-top: 8px;">
                  </div>
                  <div style="float: left;width: 100%;">
                     <div id="displayUser1"></div>
                  </div>
                  <div id="msgTitle" style="float: left;border: 1px solid #ddd;min-height: 40px;margin-top: 5px;width: 100%;">
                     <div style="float:left;margin-top: 13px;margin-left:12px;font-weight: bold;">
                        Title:
                     </div>
                        <input type="text" id="title" class="input-small" style="border: none;box-shadow:none;margin-left: 2px;margin-top: 8px;">
                  </div>
                  
                  <!--<div id="msgBox" contenteditable="true" style="float: left;border: 1px solid #ddd; min-height: 260px;margin-top: 5px;width: 100%;">
                  
                  </div>-->
                  <textarea id="msgBox" style="float: left;border: 1px solid #ddd; min-height: 260px;margin-top: 5px;width: 100%;"></textarea>
                  <br>
                  <button class="btn-basicBtn padding_5 cursor tip" data-original-title="Add Files" style="margin-top: 3px;">
                     <form id="postFile_1" method="post" enctype="multipart/form-data" action='/ajax/uploadFile'>
                        <div class="postActions" style="margin-left: 5px;margin-top: 5px;">
                           <div id="uniform-fileInput" class="uploader">
                              <input type="file" data-action-id="2" value="upload"
                                 name="postFile" id="uploadForm_1" size="24" data-get-file="imagePost_1" data-show="imagePreviewUpload_1" data-form="postFile_1" data-location="previewImagePostUpload_1" data-action-type="postFile" style="opacity: 0;" class="postFile">
                              <span id="uploadFilename_2" class="filename">No file selected</span>
                              <span class="action">Choose File</span>
                              <input type="hidden" value="messageFileUpload" name="uploadType">
                              <input type="hidden" value="messageUpload" name="uploadFolder">
                           </div>
                           <img src="/images/loader/loader.gif" class="postFileLoad pull-left display" style="margin-left: 5px;margin-top:6px;"/>
                        </div>
                     </form>
                  </button>
                  <div class="imagePreviewUpload_1 display" style="float: left;width: 100%;border: 1px solid #D5D5D5;margin-top:10px;background-color: #fff;margin-bottom: 5px;"> 
                     <div style="padding: 5px;" class="previewImagePostUpload_1">
   
                     </div>
                  </div>
                  <input type="button" class="btn-blueBtn pull-right newMsg" dataTitle="title" dataMessage="msgBox"  dataTagID="listRecipient1" value="SEND"  data-get-file="imagePost_1" data-location="messageUpload" data-file="imagePreviewUpload_1" style="margin-top:10px;">
               </div>
            </div>
            <div class="msg_container">
               <!-- View Message Content -->
               <ul class="scrollbarP messagesOne contentHolder pull-left">
                  <div class="msgviewContent">
                     <div class="msgNote ">
                        <label>
                           <label>No Conversation Selected</label>
                           <br>
                           <label>Select message from the left</label>
                           <br>
                           <label>side to view your conversation</label>
                        </label>
                     </div>
                  </div>
               </ul>
               
               <div style="padding: 5px;">
                  <div style="text-align: center;">
                     <textarea placeholder="Reply..." class="input-replyMsg replyMsg_conversation" data-id="" style="" data-get-file="imagePost" data-location="messageUpload" data-file="imagePreviewUpload"></textarea>
                  </div>
                  <button class="btn-basicBtn padding_5 cursor tip" data-original-title="Add Files" style="margin-left: 3px;">
                     <form id="postFile" method="post" enctype="multipart/form-data" action='/ajax/uploadFile'>
                        <div class="postActions" style="margin-left: 5px;margin-top: 5px;">
                           <div id="uniform-fileInput" class="uploader">
                              <input type="file" data-action-id="2" value="upload"
                                 name="postFile" id="uploadForm" size="24" data-get-file="imagePost" data-show="imagePreviewUpload" data-form="postFile" data-location="previewImagePostUpload" data-action-type="postFile" style="opacity: 0;" class="postFile">
                              <span id="uploadFilename_2" class="filename">No file selected</span>
                              <span class="action">Choose File</span>
                              <input type="hidden" value="messageFileUpload" name="uploadType">
                              <input type="hidden" value="messageUpload" name="uploadFolder">
                           </div>
                           <img src="/images/loader/loader.gif" class="postFileLoad pull-left display" style="margin-left: 5px;margin-top:6px;"/>
                        </div>
                     </form>
                  </button>
                  <div class="imagePreviewUpload display" style="float: left;width: 100%;border: 1px solid #D5D5D5;margin-top:10px;background-color: #fff;margin-bottom: 5px;"> 
                     <div style="padding: 5px;" class="previewImagePostUpload">
   
                     </div>
                  </div>
               </div>
               
            </div>
         </div>
         
      </div>   
   </div>
</div>
